# -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available.
Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at https://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
"""
import logging
import os

from django.db import migrations

logger = logging.getLogger("app")


def init_isp_and_ap(apps, schema_editor):
    isp_list = [
        {
            "isp": "PrivateCloud",
            "isp_name": "企业私有云",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyA+PHBhdGggZD0iTTgsMzguMmMwLTUuOCw1LjQtOC4zLDcuNi04LjRsMS44LTAuMWwwLjItMS43YzAtMC41LDEuMi0xMiwxMy40LTEyYzAsMCwwLDAsMCwwYzAuNCwwLDcuNiwwLjEsMTAuNyw2LjggbDMuNi0xLjdDNDEsMTIsMzEuMywxMiwzMC45LDEyQzE5LjMsMTIsMTQuOCwyMC40LDEzLjcsMjZDOS4zLDI3LjEsNCwzMS40LDQsMzguMkM0LDQ2LjYsOC43LDUyLDE1LjksNTJoMTZ2LTRoLTE2IEM4LjgsNDgsOCw0MS4yLDgsMzguMnoiLz48cGF0aCBkPSJNNTgsMzJoLTEuNWMtMC4zLTQuOC00LjItOC41LTktOC41cy04LjgsMy44LTksOC41SDM3Yy0xLjEsMC0yLDAuOS0yLDJ2MTZjMCwxLjEsMC45LDIsMiwyaDIxIGMxLjEsMCwyLTAuOSwyLTJWMzRDNjAsMzIuOSw1OS4xLDMyLDU4LDMyeiBNNDcuNSwyNy40YzIuNiwwLDQuOCwyLDUsNC41aC0xMEM0Mi43LDI5LjQsNDQuOSwyNy40LDQ3LjUsMjcuNHogTTU2LDQ4SDM5VjM2aDE3VjQ4eiIvPjxwYXRoIGQ9Ik00NS41IDM5SDQ5LjVWNDVINDUuNXoiLz48L2c+PC9zdmc+",
        },
        {
            "isp": "Amazon",
            "isp_name": "AWS",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMjAyZjNmIiBkPSJNMTkuOCwyOC41Yy0wLjMtMC44LTAuMS00LjcsMC03LjRzLTEuNC01LjItNS01LjZTOCwxNi44LDcuNiwxNy4xYy0wLjQsMC4zLTAuMywxLjksMC4yLDIJYzAuNSwwLDEuNy0wLjYsMi41LTAuOGMwLjktMC4yLDQuNS0xLDUuNywwLjZjMS4xLDEuNiwwLjYsNC4yLDAuNiw0LjJTMTQsMjIuMywxMiwyMi41Yy0xLjQsMC4xLTUuNSwwLjgtNS42LDUJYy0wLjEsNC4yLDIuNyw1LjIsNS44LDUuMWMzLjEtMC4xLDQuNy0yLjUsNC43LTIuNXMxLjMsMi4yLDEuNywyLjJzMi0xLjIsMi4xLTEuNkMyMC44LDMwLjQsMjAsMjkuMywxOS44LDI4LjV6IE0xNiwyOC44CWMtMSwxLTIuMiwxLjYtNCwxLjZzLTIuMi0xLjYtMi4zLTIuMmMwLTAuNi0wLjItMi45LDIuMS0zLjNzNC45LDAuNCw0LjksMC40UzE3LDI3LjgsMTYsMjguOHoiLz48cGF0aCBmaWxsPSIjMjAyZjNmIiBkPSJNMjIuNCwxNmMtMC41LDAtMS4xLTAuMS0wLjcsMS4yczQuMiwxMy43LDQuMywxNC4xYzAuMiwwLjQsMC4xLDAuOSwxLjEsMC45YzEsMCwxLjMsMCwxLjgsMAljMC41LDAsMC42LTAuMywxLjEtMS45czIuNi0xMC44LDIuNi0xMC44bDIuMyw5LjRjMCwwLDAu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QuMi0xMS42LDYuNmMtNy45LDIuNC0xOS44LDEuNS0yNi41LTEuNUM5LjcsNDIuNiwzLjgsMzcuOSw0LjMsMzcuMnoiLz48cGF0aCBmaWxsPSIjZmY5NDAwIiBkPSJNNDkuMywzOC41YzAuMi0wLjQsMi0yLDUtMi4zYzMtMC4yLDQuOCwwLjIsNS4zLDAuOHMwLjEsMy40LTAuNyw1LjJjLTAuOCwxLjctMi42LDQuNC0zLjQsNC4xCWMtMC44LTAuMywwLjUtMS45LDEuMS0zLjZjMC42LTEuNywwLjctMy4xLDAuNS0zLjdjLTAuMy0wLjUtMS43LTAuOC0zLjctMC43QzUxLjIsMzguNSw0OS4xLDM4LjksNDkuMywzOC41eiIvPjwvc3ZnPg==",
        },
        {
            "isp": "MicroSoft",
            "isp_name": "Azure",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDA3NWJlIj48cGF0aCBkPSJNMzQuOSA4LjNMMTguMiAyMi4zIDQgNDYuOSAxNi43IDQ2Ljl6Ii8+PHBhdGggZD0iTTM2LjcgMTEuNkwzMCAzMC4zIDQzLjMgNDYuOSAxNy4xIDUxLjcgNjAgNTEuN3oiLz48L2c+PC9zdmc+",
        },
        {
            "isp": "Google",
            "isp_name": "GCP",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjZWZlZmVmIiBkPSJNMzkuNiwxOC45SDI0LjRMMTYuOSwzMmw3LjYsMTMuMWgxNS4xTDQ3LjEsMzJMMzkuNiwxOC45eiBNMzIsMzguOGMtMy44LDAtNi44LTMtNi44LTYuOHMzLTYuOCw2LjgtNi44IHM2LjgsMyw2LjgsNi44UzM1LjgsMzguOCwzMiwzOC44eiIvPjxwYXRoIGZpbGw9IiMzYzhjZmQiIGQ9Ik0xMi40LDQwLjhsNS4xLTguOWwwLDBsNy4yLTEyLjZoMy45aDEwLjZoMTAuMmwtMy42LTYuMmMtMC45LTEuNi0yLjctMi42LTQuNi0yLjZIMjIuN2MtMS45LDAtMy42LDEtNC42LDIuNiBMOC44LDI5LjNjLTAuOSwxLjYtMC45LDMuNiwwLDUuM0wxMi40LDQwLjh6Ii8+PHBhdGggZmlsbD0iI2ZmY2QwMCIgZD0iTTQ5LjQsNDQuNmwtMTAuMiwwbDAsMGwtMTQuNSwwbC0yLTMuNGwtNS4zLTkuMmwtNS4xLTguOWwtMy42LDYuMmMtMC45LDEuNi0wLjksMy42LDAsNS4zTDE4LDUwLjggYzAuOSwxLjYsMi43LDIuNiw0LjYsMi42bDE4LjYsMGMxLjksMCwzLjYtMSw0LjYtMi42TDQ5LjQsNDQuNnoiLz48cGF0aCBmaWxsPSIjZTEzNjJmIiBkPSJNNTUuMywyOS4zbC01LjgtOS45SDM5LjJsMC4xLDAuMWwwLDBMNDYuNiwzMmwtMS45LDMuNGwtNS4yLDkuMmwtNS4xLDguOWw3LjIsMGMxLjksMCwzLjYtMSw0LjYtMi43IGw5LjItMTYuMkM1Ni4yLDMzLDU2LjIsMzAuOSw1NS4zLDI5LjN6Ii8+PC9zdmc+",
        },
        {
            "isp": "SalesForce",
            "isp_name": "SalesForce",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDA5Y2RiIj48cGF0aCBkPSJNMzkuOCwyOC41Yy0xLjEsMC0xLjYsMS0xLjYsMmMwLDEuMSwwLjYsMiwxLjYsMmMwLjksMCwxLjYtMC44LDEuNi0yQzQxLjMsMjkuNiw0MC45LDI4LjUsMzkuOCwyOC41eiIvPjxwYXRoIGQ9Ik00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MS0wLjQsMS4yLTAuOWMwLTAuMSwwLjEtMC4yLDAuMS0wLjN2LTAuOSBDMTguMiwzMC40LDE3LjEsMzAuNiwxNy4xLDMxLjZ6Ii8+PHBhdGggZD0iTTUzLjQsMjguNWMtMC45LDAtMS40LDAuOS0xLjQsMS41aDIuN0M1NC43LDI5LjQsNTQuNSwyOC41LDUzLjQsMjguNXoiLz48cGF0aCBkPSJNMjYuMSwyOC41Yy0wLjksMC0xLjQsMC45LTEuNCwxLjVoMi43QzI3LjQsMjkuNCwyNy4yLDI4LjUsMjYuMSwyOC41eiIvPjwvZz48L3N2Zz4=",
        },
        {
            "isp": "Oracle",
            "isp_name": "Oracle Cloud",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjZmYwMDA2IiBkPSJNNDkuNiwyNy43Yy0wLjEsMC0wLjEsMC0wLjIsMGMtMS45LTMuMS01LjQtNS4xLTkuMy01LjFjLTAuNCwwLTAuNywwLTEuMSwwLjFjLTEuOS00LjEtNi4xLTctMTEtNyBjLTUuNCwwLTEwLDMuNi0xMS41LDguNWMtMC4xLDAtMC4zLDAtMC40LDBDOS40LDI0LjEsNCwyOS41LDQsMzYuM2MwLDYuNSw1LjIsMTEuOSwxMS42LDEyLjF2MGgzNEM1NS4zLDQ4LjQsNjAsNDMuOCw2MCwzOCBDNjAsMzIuMyw1NS4zLDI3LjcsNDkuNiwyNy43eiIvPjxnIGZpbGw9IiNmZmYiPjxwYXRoIGQ9Ik0xNC4xLDMyLjlMMTQuMSwzMi45bC0zLjgsMGMtMS44LDAtMy4yLDEuNC0zLjIsMy4yYzAsMS44LDEuNCwzLjIsMy4yLDMuMmgzLjh2MGMxLjcsMCwzLjEtMS40LDMuMS0zLjIgQzE3LjIsMzQuNCwxNS44LDMzLDE0LjEsMzIuOXogTTEzLjYsMzguM0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LTEuNywwLTMuMSwxLjQtMy4xLDMuMSBjMCwxLjcsMS40LDMuMSwzLjEsMy4xdjBoMy44bDAuNy0xLjFoLTQuNUM1MS40LDM4LjIsNTAuNiwzNy41LDUwLjQsMzYuNnoiLz48L2c+PC9zdmc+",
        },
        {
            "isp": "IBM",
            "isp_name": "IBM Cloud",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDBiYWVjIiBkPSJNMTYuOSw0MS4yYy0wLjQsMC0wLjgtMC4zLTEtMC43Yy0wLjMtMS4zLTAuNS0yLjYtMC41LTRjMC04LjgsNy4yLTE2LDE2LTE2YzMuNywwLDcuMywxLjMsMTAuMiwzLjYgYzAuNCwwLjMsMC41LDEsMC4xLDEuNGMtMC4zLDAuNC0xLDAuNS0xLjQsMC4xYy0yLjUtMi4xLTUuNy0zLjItOC45LTMuMmMtNy43LDAtMTQsNi4zLTE0LDE0YzAsMS4yLDAuMSwyLjQsMC40LDMuNSBjMC4xLDAuNS0wLjIsMS4xLTAuNywxLjJDMTcuMSw0MS4yLDE3LDQxLjIsMTYuOSw0MS4yeiIvPjxwYXRoIGZpbGw9IiMwMDcxZmYiIGQ9Ik00My43LDUzSDE4LjVDMTIuNyw1Myw4LDQ4LjMsOCw0Mi41YzAtMy4xLDEuMy02LDMuNy04YzAuNC0wLjQsMS0wLjMsMS40LDAuMXMwLjMsMS0wLjEsMS40IGMtMS45LDEuNi0zLDQtMyw2LjVjMCw0LjcsMy44LDguNSw4LjUsOC41aDI1LjJjNS43LDAsMTAuMy00LjYsMTAuMy0xMC4zcy00LjYtMTAuMy0xMC4zLTEwLjNjLTIuNywwLTUuMywxLjEtNy4zLDMgYy0wLjQsMC40LTEsMC40LTEuNCwwYy0wLjQtMC40LTAuNC0xLDAtMS40YzIuMy0yLjMsNS40LTMuNiw4LjctM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sMTcuOWMtMC41LDAtMS0wLjQtMS0xdi01YzAtMC41LDAuNC0xLDEtMXMxLDAuNCwxLDF2NUMzMi42LDE3LjUsMzIuMiwxNy45LDMxLjcsMTcuOXoiLz48L3N2Zz4=",
        },
        {
            "isp": "Aliyun",
            "isp_name": "阿里云",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjZmY1ZTAwIj48cGF0aCBkPSJNMjIuNSw0NC45Yy0xLjMtMS4xLTYuMi0xLjktOC4zLTIuNmMtMi4xLTAuOC0zLjMtMi0zLjMtNC44YzAtMi44LDAtNS41LDAtNS41czAtMi42LDAtNS41IGMwLTIuOCwxLjItNCwzLjMtNC44YzIuMS0wLjgsNy4xLTEuNiw4LjMtMi42YzEuMy0xLjEsMy4zLTQuNiwzLjMtNC42SDE0Yy01LjUsMC0xMCw0LjUtMTAsMTB2MTVjMCw1LjUsNC41LDEwLDEwLDEwaDExLjggQzI1LjgsNDkuNSwyMy44LDQ1LjksMjIuNSw0NC45eiIvPjxwYXRoIGQ9Ik01MCwxNC41SDM4LjJjMCwwLDIsMy42LDMuMyw0LjZjMS4zLDEuMSw2LjIsMS45LDguMywyLjZjMi4xLDAuOCwzLjMsMiwzLjMsNC44YzAsMi44LDAsNS41LDAsNS41IHMwLDIuNiwwLDUuNWMwLDIuOC0xLjIsNC0zLjMsNC44Yy0yLjEsMC44LTcuMSwxLjYtOC4zLDIuNmMtMS4zLDEuMS0zLjMsNC42LTMuMyw0LjZINTBjNS41LDAsMTAtNC41LDEwLTEwdi0xNSBDNjAsMTksNTUuNSwxNC41LDUwLDE0LjV6Ii8+PC9nPjxwYXRoIGZpbGw9IiNmZjVlMDAiIGQ9Ik0yMyAzMEg0MVYzNEgyM3oiLz48L3N2Zz4=",
        },
        {
            "isp": "Tencent",
            "isp_name": "腾讯云",
            "isp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uN2MwLjEsMCwwLjEsMCwwLjIsMGwzLjUtMy40YzAuMS0wLjEsMC4xLTAuMSwwLTAuMkMyOC41LDMxLjksMjYuMiwyOS43LDI0LjcsMjguNyIvPjxwYXRoIGZpbGw9IiMwMDZlZmYiIGQ9Ik00OC40LDIzLjFDNDYsMTYuMywzOS42LDExLjUsMzIsMTEuNWMtOC43LDAtMTUuOSw2LjQtMTcuMiwxNC43YzAuNy0wLjEsMS40LTAuMiwyLjEtMC4yYzEsMCwyLDAuMSwyLjksMC4zIGMwLDAsMCwwLDAuMSwwYzEuMi01LjYsNi4xLTkuOCwxMi4xLTkuOGM0LjksMCw5LjIsMywxMS4yLDcuMmMwLDAuMSwwLjEsMC4xLDAuMSwwLjFjMS41LTAuNCwzLjItMC42LDQuOS0wLjUgQzQ4LjQsMjMuMyw0OC41LDIzLjIsNDguNCwyMy4xIi8+PC9zdmc+",
        },
        {
            "isp": "ECloud",
            "isp_name": "中国电信",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjZmY5ODAwIiBkPSJNNTAsMjUuOGMtMS4xLTMuNy00LjUtNi40LTguNS02LjRjLTAuOCwwLTEuNiwwLjEtMi40LDAuM2MtMi41LTIuOC02LjEtNC42LTEwLjEtNC42Yy01LjUsMC0xMC4yLDMuMy0xMi4zLDgJYzAsMCwwLTAuMSwwLjEtMC4xYy0wLjIsMC0wLjMsMC0wLjUsMEM5LjUsMjMsNCwyOC41LDQsMzUuM3M1LjUsMTIuMywxMi4zLDEyLjNoMjQuMWMtMi44LTIuMy0zLjQtNC4xLTMuNC00LjFIMjUuNGgtOS43djAJYy00LjItMC4zLTcuNi0zLjgtNy42LTguMmMwLTQuMywzLjMtNy44LDcuNS04LjJjMCwwLDAsMCwwLDBjMC4yLDAsMC40LDAsMC42LDBjMS40LDAsMi43LDAuMywzLjgsMC45YzAuMy00LjcsNC4yLTguNSw5LjEtOC41CWMwLjQsMCwwLjcsMCwxLjEsMC4xYzAuMSwwLDAuMiwwLDAuNCwwLjFjMC4xLDAsMC4zLDAsMC40LDAuMWMzLjIsMC42LDUuOCwyLjksNi43LDZjMCwwLDAtMC4xLDAuMS0wLjFjMCwwLDAsMCwwLDAJYzAuMS0wLjIsMC4zLTAuNCwwLjUtMC42YzAsMCwwLjEtMC4xLDAuMS0wLjFjMC4yLTAuMiwwLjQtMC4zLDAuNi0wLjVjMCwwLDAuMS0wLjEsMC4xLTAuMWMwLjItMC4xLDAuNC0wLjIsMC42LTAuMwljMCwwLDAuMSwwLDAuMS0wLjFjMC4yLTAuMSwwLjUtMC4yLDAuOC0wLjJjMC4xLDAsMC4xLDAsMC4yLDBjMC4zLTAuMSwwLjYtMC4xLDAuOS0wLjFjMCwwLDAsMCwwLDBjMCwwLDAsMCwwLDAJYzEuOCwwLDMuMywxLDQuMSwyLjVjMCwwLDAsMCwwLDBjMC40LDAuNywwLjYsMS40LDAuNiwyLjNjMCwwLjctMC4yLDEuNC0wLjUsMmMwLjgtMC4zLDEuNy0wLjUsMi42LTAuNWMzLjYsMCw2LjYsMi43LDcuMSw2LjIJYzAsMC4xLDAsMC4yLDAsMC4yYzAsMC4xLDAsMC4yLDAsMC4zYzAsMC4zLDAuMSwwLjYsMC4xLDAuOGMwLDQtMy4yLDcuMi03LjIsNy4yYy0zLjQsMC02LjItMi4zLTctNS40aDMuNGwtNS45LTcuOWwtNS42LDcuOWgzLjcJYzAuOSw1LjUsNS43LDkuOCwxMS41LDkuOGM2LjQsMCwxMS42LTUuMiwxMS42LTExLjZDNjAsMzEuNCw1NS43LDI2LjYsNTAsMjUuOHoiLz48L3N2Zz4=",
        },
        {
            "isp": "UCloud",
            "isp_name": "UCloud",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3c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xLjEsMy41LDQuMnMtMC4zLDYuMi0zLjUsNi4ycy01LjIsMC01LjIsMHYtNy4zaDIuNWgwLjN2NS4yCWMwLDAsMS40LDAsMi4xLDBzMC45LTEuNSwwLjktMy4xYzAtMS42LTAuMS0zLjMtMS4xLTMuM3MtNC44LDAtNC44LDBWMjcuMnoiLz48L3N2Zz4=",
        },
        {
            "isp": "MOS",
            "isp_name": "美团云",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjMDAzZTllIiBkPSJNNDQsMTYuMWMtNC44LDAtOS4xLDIuMS0xMiw1LjVjLTIuOS0zLjQtNy4yLTUuNS0xMi01LjVjLTguOCwwLTE1LjksNy4xLTE1LjksMTUuOWMwLDguOCw3LjEsMTUuOSwxNS45LDE1LjkJYzQuOCwwLDkuMS0yLjEsMTItNS41YzIuOSwzLjQsNy4yLDUuNSwxMiw1LjVjOC44LDAsMTUuOS03LjEsMTUuOS0xNS45QzU5LjksMjMuMiw1Mi44LDE2LjEsNDQsMTYuMXoiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMzcuNiwyOC41bC05LjEsOS4xYy0wLjYsMC42LTEuNSwwLjYtMi4xLDBsMCwwYy0wLjYtMC42LTAuNi0xLjUsMC0yLjFsOS4xLTkuMWMwLjYtMC42LDEuNS0wLjYsMi4xLDBsMCwwCUMzOC4yLDI3LDM4LjIsMjcuOSwzNy42LDI4LjV6Ii8+PC9zdmc+",
        },
        {
            "isp": "KSCLOUD",
            "isp_name": "金山云",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSIjZGEwMDAwIiBkPSJNMjEuNSwzMy45YzAsMCwyLjUsMS4yLDIuNCw0LjZjLTAuMSwzLjQtMy4xLDYuMS02LjgsNi4xcy04LTMtOC03LjdzMy45LTguNCw3LjEtOC40czUsMC45LDUsMC45CXMtMS43LTQuOSwyLjYtMTBzMTIuMi00LjMsMTUuOC0wLjdjMy4zLDMuNCwzLjgsNi4yLDIuOSwxMS4xYzAsMCwzLjgtMS43LDcuMi0wLjFjMy40LDEuNyw1LjQsNS42LDQsOS45cy01LjEsNS43LTkuMSw0LjcJcy00LjYtNi04LTkuMnMtNy4yLTAuOC04LjgsMC41YzAsMCwyLjQtMC42LDMuOSwwLjljMS41LDEuNiw1LjQsOC43LDguNSwxMS4zYzMuMSwyLjYsOC45LDIuOSwxMi43LDAuOWMzLjgtMi4xLDYuMS01LDYuOS05LjcJYzAuOC00LjctMC43LTguNS00LjMtMTIuMXMtNy4zLTIuOS03LjMtMi45cy0wLjEtNS4xLTQuOC05LjRTMzQuMSw5LjksMzEuOCwxMGMtMi4zLDAuMS03LDAuMi0xMS4zLDQuN3MtNC4zLDguNC00LjMsOC40CVMxMS4zLDIzLDgsMjYuOHMtNS42LDkuMi0yLjQsMTYuNHMxMi40LDcuOCwxNiw2LjJzNS43LTQuNyw1LjctNC43czMuMyw1LDQuNCw2LjZjMS4yLDEuNSwzLjQsMi44LDUuNywyLjhzNC43LTEuOCw0LjctMS44CXMtMi41LDAuNi00LjEtMS4xYy0xLjYtMS43LTcuMi0xMC41LTguNi0xMi40QzI4LDM2LjcsMjYuNCwzMy40LDIxLjUsMzMuOXoiLz48L3N2Zz4=",
        },
        {
            "isp": "baidu",
            "isp_name": "百度云",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMjRjZjY4Ij48cGF0aCBkPSJNMTMsMTkuMWMwLDAsNC40LDIuNiw1LjgsMy40YzEuNSwwLjksMi40LDEuMSw0LjQsMGMyLTEuMSw1LjQtMy4xLDYuOC0zLjljMS4yLTAuNywxLjUtMC43LDIuMS0wLjhsMC05LjkgTDEzLDE5LjF6Ii8+PHBhdGggZD0iTTMyLjIsOGwwLDkuOWMwLjYsMCwwLjksMC4xLDIuMSwwLjhjMS40LDAuOCw0LjgsMi43LDYuOCwzLjljMiwxLjEsMi45LDAuOSw0LjQsMGMxLjUtMC45LDUuOC0zLjQsNS44LTMuNCBMMzIuMiw4eiIvPjwvZz48ZyBmaWxsPSIjMTE2N2ZhIj48cGF0aCBkPSJNMzAsNTZjMCwwLDAtNS4xLDAtNi44YzAtMS43LTAuMi0yLjYtMi4yLTMuOGMtMi0xLjItNS40LTMuMS02LjgtMy45Yy0xLjItMC43LTEuNC0wLjktMS43LTEuNWwtOC42LDVMMzAsNTYgeiIvPjxwYXRoIGQ9Ik0xMC43LDQ1bDguNi01Yy0wLjMtMC41LTAuNC0wLjktMC40LTIuMmMwLTEuNiwwLTUuNS0wLjEtNy44YzAtMi4zLTAuNy0zLTIuMi0zLjhjLTEuNS0wLjgtNS45LTMuMy01LjktMy4zIEwxMC43LDQ1eiIvPjwvZz48ZyBmaWxsPSIjZmI1MjM5Ij48cGF0aCBkPSJNMzQsNTZjMCwwLDAtNS4xLDAtNi44YzAtMS43LDAuMi0yLjYsMi4yLTMuOGMyLTEuMiw1LjQtMy4xLDYuOC0zLjljMS4yLTAuNywxLjQtMC45LDEuNy0xLjVsOC42LDVMMzQsNTZ6Ii8+PHBhdGggZD0iTTUzLjMsNDVsLTguNi01YzAuMy0wLjUsMC40LTAuOSwwLjQtMi4yYzAtMS42LDAtNS41LDAuMS03LjhjMC0yLjMsMC43LTMsMi4yLTMuOGMxLjUtMC44LDUuOS0zLjMsNS45LTMuMyBMNTMuMyw0NXoiLz48L2c+PC9zdmc+",
        },
        {
            "isp": "huawei",
            "isp_name": "华为云",
            "isp_icon": "PHN2ZyB2aWV3Qm94PSIwIDAgNjQgNjQiIHZlcnNpb249IjEuMSIgeG1sb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ZCIgZD0iTTMzLjQsNDIuOGMwLjEsMCwwLjMtMC4xLDAuMy0wLjFsMCwwYzEuNi0yLjQsOS4xLTEzLjksMTAuNS0yMC44YzAsMCwwLjgtMy40LDAtNS43CWMwLDAtMS4xLTQuNC01LjctNS41YzAsMC0xLjQtMC4zLTIuNy0wLjZjMCwwLTUsNi44LTIuNiwzMi40bDAsMEMzMy4zLDQyLjgsMzMuNCw0Mi44LDMzLjQsNDIuOHoiLz48cGF0aCBmaWxsPSJyZWQiIGQ9Ik0zNy42LDQ3LjhDMzcuNiw0Ny44LDM3LjUsNDcuOCwzNy42LDQ3LjhjLTAuMSwwLjEtMC4xLDAuMi0wLjEsMC40bDAsMGMxLjYsMS4zLDYuNyw0LjksOSw1LjYJYzAsMCw0LjUsMS42LDguMy01LjRMMzcuNiw0Ny44TDM3LjYsNDcuOHoiLz48cGF0aCBmaWxsPSJyZWQiIGQ9Ik01OS41LDMyLjZjMCwwLTE0LjYsOC4xLTIyLjEsMTMuNmwwLDBjMCwwLTAuMSwwLjEtMC4xLDAuM2wwLjEsMC4xbDAsMGMyLjcsMCwxMywwLDEzLjIsMAljMCwwLDEuNCwwLDMtMC43YzAsMCwzLjctMS4xLDUuNi01LjZDNTkuMSw0MC40LDYwLjgsMzYuOCw1OS41LDMyLjZ6Ii8+PHBhdGggZmlsbD0icmVkIiBkPSJNMzUuOCw0NC4zYzAsMCwwLjEsMC4xLDAuMywwbDAsMEMzOC42LDQzLDQ4LjgsMzcuNiw1MywzMy40YzAsMCwyLjctMi4zLDIuOS01LjgJYzAuMy01LTQuNS05LjYtNC41LTkuNnMtOSwxMS4zLTE1LjUsMjYuMWwwLDBDMzUuOCw0NCwzNS43LDQ0LjMsMzUuOCw0NC4zeiIvPjwvc3ZnPg==",
        },
        {
            "isp": "capitalonline",
            "isp_name": "首都云",
            "isp_icon": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb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ik0xMCwzNGwwLjQtMi44SDUuNGMtMC4yLDEtMC4zLDEuOS0wLjUsMi44SDEweiIvPgo8L2c+Cjwvc3ZnPgo=",
        },
    ]

    # 初始化任务配置
    GlobalSettings = apps.get_model("node_man", "GlobalSettings")
    GlobalSettings.objects.update_or_create(defaults={"v_json": isp_list}, **{"key": "isp"})

    job_settings = {
        "install_p_agent_timeout": 600,
        "install_agent_timeout": 600,
        "install_proxy_timeout": 600,
        "install_download_limit_speed": 0,
        "parallel_install_number": 2000,
        "node_man_log_level": "ERROR",
    }

    # 初始化云服务商
    GlobalSettings.objects.update_or_create(defaults={"v_json": job_settings}, **{"key": "job_settings"})
    zk_hosts = os.getenv("BKAPP_GSE_ZK_HOST", "127.0.0.1:2181")
    zk_account, zk_password = os.getenv("BKAPP_GSE_ZK_AUTH", "bkzk:zkpass").split(":", 1)
    gse_server_lan_iplist = os.getenv("BKAPP_GSE_SERVER_LAN_IPLIST", "").split(",")
    gse_server_wan_iplist = os.getenv("BKAPP_GSE_SERVER_WAN_IPLIST", "").split(",")
    if gse_server_wan_iplist and len(gse_server_lan_iplist) != len(gse_server_wan_iplist):
        raise Exception("GSE SERVER 内网IP和外网IP数量不匹配")
    else:
        gse_servers = [
            {"inner_ip": gse_server_lan_iplist[index], "outer_ip": gse_server_wan_iplist[index]}
            for index in range(len(gse_server_lan_iplist))
        ]
    linux_setup_path = os.getenv("BKAPP_GSE_AGENT_HOME", "/usr/local/gse")
    linux_data_path = os.getenv("BKAPP_GSE_AGENT_DATA_DIR", "/var/lib/gse")
    linux_run_path = os.getenv("BKAPP_GSE_AGENT_RUN_DIR", "/var/run/gse")
    linux_log_path = os.getenv("BKAPP_GSE_AGENT_LOG_DIR", "/var/log/gse")

    win_setup_path = os.getenv("BKAPP_GSE_WIN_AGENT_HOME", "c:\\gse")
    win_data_path = os.getenv("BKAPP_GSE_WIN_AGENT_DATA_DIR", "c:\\gse\\data")
    win_run_path = os.getenv("BKAPP_GSE_WIN_AGENT_RUN_DIR", "c:\\gse\\logs")
    win_log_path = os.getenv("BKAPP_GSE_WIN_AGENT_LOG_DIR", "c:\\gse\\logs")

    default_ap = {
        "name": "默认接入点",
        "ap_type": "system",
        "region_id": os.getenv("BKAPP_GSE_REGION_ID", "test"),
        "city_id": os.getenv("BKAPP_GSE_CITY_ID", "test"),
        "zk_hosts": [{"zk_ip": zk.split(":")[0], "zk_port": zk.split(":")[1]} for zk in zk_hosts.split(",")],
        "zk_account": zk_account,
        "zk_password": zk_password,
        "servers": gse_servers,
        "package_inner_url": os.getenv("BKAPP_NGINX_URL", "http://127.0.0.1/download"),
        "package_outer_url": os.getenv("BKAPP_NGINX_WAN_URL", "http://127.0.0.1/download"),
        "agent_config": {
            "linux": {
                "setup_path": linux_setup_path,
                "data_path": linux_data_path,
                "run_path": linux_run_path,
                "log_path": linux_log_path,
                "dataipc": "/var/run/ipc.state.report",
                "temp_path": "/tmp",
            },
            "windows": {
                "setup_path": win_setup_path,
                "data_path": win_data_path,
                "run_path": win_run_path,
                "log_path": win_log_path,
                "temp_path": "C:\\tmp",
                "dataipc": 47000,
            },
        },
        "description": "GSE默认接入点",
        "is_default": True,
    }

    # 初始化默认接入点
    AccessPoint = apps.get_model("node_man", "AccessPoint")
    AccessPoint.objects.update_or_create(defaults=default_ap, **{"is_default": True})


class Migration(migrations.Migration):
    dependencies = [
        ("node_man", "0001_initial"),
    ]

    operations = [
        migrations.RunPython(init_isp_and_ap),
    ]
